Skip to content

refactor(cli): centralize process lifecycle#2171

Open
jrusso1020 wants to merge 1 commit into
07-10-fix-cloudrun-publish-adapter-contractfrom
07-10-refactor-cli-centralize-process-lifecycle
Open

refactor(cli): centralize process lifecycle#2171
jrusso1020 wants to merge 1 commit into
07-10-fix-cloudrun-publish-adapter-contractfrom
07-10-refactor-cli-centralize-process-lifecycle

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Centralize CLI process termination and error signaling at the executable boundary.

Why

Command handlers wrote process.exit/process.exitCode directly, which made cleanup, telemetry finalization, testing, and machine-readable errors inconsistent.

How

Introduce CommandResult, CliUsageError, CliRuntimeError, and CliResultSignal. Route termination through cli.ts, preserve finalizers, and enforce ownership with an AST-based repository check.

Test plan

  • CLI suite and build
  • CLI process-ownership checker, lint, typecheck, and stack-wide tests

This was referenced Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 95f3b3d to e3bcd5a Compare July 12, 2026 04:32
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 07e0da6 to e025a87 Compare July 12, 2026 04:58
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from e3bcd5a to c4d49b9 Compare July 12, 2026 04:58
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from e025a87 to d2414d8 Compare July 12, 2026 08:54
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from d7ee865 to 59c8c85 Compare July 12, 2026 09:05
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch 2 times, most recently from 0368f64 to aa19b4f Compare July 12, 2026 09:11
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 0e1b672 to b697469 Compare July 13, 2026 15:52
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from aa19b4f to 418522f Compare July 13, 2026 15:52
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 8ea5a53 to 32efa63 Compare July 13, 2026 18:09
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 3bf843b to 25ca00b Compare July 13, 2026 18:09
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 32efa63 to e4fa818 Compare July 13, 2026 18:35
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 2370bf4 to 593c88d Compare July 13, 2026 20:27
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 119c3a7 to 95c5ca5 Compare July 13, 2026 20:33
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch 2 times, most recently from 3794659 to 2dfc8f1 Compare July 13, 2026 22:09
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 95c5ca5 to 138681f Compare July 13, 2026 22:09
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 2dfc8f1 to f9c74e6 Compare July 13, 2026 22:18
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 15bbbc2 to f16b507 Compare July 13, 2026 23:08
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch 2 times, most recently from 4aa8d4e to 5d3ce2c Compare July 14, 2026 00:03
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from f16b507 to 57ef434 Compare July 14, 2026 00:03
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 57ef434 to a24f174 Compare July 14, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant